package net.mcreator.playerhuds.procedure;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.Entity;

import net.mcreator.playerhuds.ElementsPlayerhudsMod;

import java.util.Map;

@ElementsPlayerhudsMod.ModElement.Tag
public class ProcedureMainHudShowAndHide extends ElementsPlayerhudsMod.ModElement {
	public ProcedureMainHudShowAndHide(ElementsPlayerhudsMod instance) {
		super(instance, 7);
	}

	public static boolean executeProcedure(Map<String, Object> dependencies) {
		if (dependencies.get("entity") == null) {
			System.err.println("Failed to load dependency entity for procedure MainHudShowAndHide!");
			return false;
		}
		Entity entity = (Entity) dependencies.get("entity");
		if ((!((entity instanceof EntityPlayer) ? ((EntityPlayer) entity).capabilities.isCreativeMode : false))) {
			return (true);
		}
		return (false);
	}
}
